<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	template="template.xhtml">
	
	<ui:define name="head">
		 
	</ui:define>

	<ui:define name="content">
            
            <p:growl id="alerta">  
                <h:form>  
                    <h:panelGrid style="margin: 0 auto">  
                        <p:toolbar>  
                            <p:toolbarGroup>  
                                <p:commandButton onclick="cadcliente.show()" value="Adicionar Cliente" image="ui-icon-plus">  
                                <p:divider>  
                                    <p:commandButton value="Adicionar Compras" image="ui-icon-plus">  
                                        <p:divider>  
                                            <p:commandButton value="Listar Compras" image="ui-icon-search"></p:commandButton>
                                        </p:divider>                                    
                                    </p:commandButton>
                                </p:divider>                                    
                                </p:commandButton>
                            </p:toolbarGroup>                                     
                        </p:toolbar>
                        
                        <p:dataTable value="#{pessoaController.listaPessoas}" rows="10" paginator="true" paginatorPosition="both" id="listaclientes" var="p">  
                            <p:column headerText="Nome">  
                                <h:outputText value="#{p.nome}"></h:outputText>
                            </p:column>  
               
                            <p:column>  
                                <p:commandButton image="ui-icon-trash"></p:commandButton>
                                <p:commandButton image="ui-icon-pencil"></p:commandButton>
                            </p:column>  
                        </p:dataTable>  
                    </h:panelGrid>  
                </h:form>  
            </p:growl>            
        <ui:include src="adicionar_cliente.xhtml"/>
    </ui:define>
</ui:composition>
